package jwdt.xadmin.goods.bean;

import java.io.Serializable;
import java.util.List;

import jwdt.common.util.CacheUtil;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Column;
import com.ezerg.db.annotation.Table;

@Table(name="t_goodsclass", keys={"classid"}, comment="分类管理")
public class TGoodsClass implements Serializable {

	private static final long serialVersionUID = 1L;

	@Column(value="classid", comment="分类ID")
	private Integer classid;
	
	@Column(value="name", comment="名称")
	private String name;
	
	@Column(value="fid", comment="上级分类")
	private Integer fid;
	
	@Column(value="zt", comment="状态")
	private Integer zt;

	public Integer getClassid() {
		return classid;
	}

	public void setClassid(Integer classid) {
		this.classid = classid;
	}

	public String getName() {
		return name;
	}
	
	public List getChildren() {
		return Jdb.get().query(this.getClass(),"fid="+this.classid+" ORDER BY zt", CacheUtil.C0);
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getFid() {
		return fid;
	}

	public void setFid(Integer fid) {
		this.fid = fid;
	}

	public Integer getZt() {
		return zt;
	}

	public void setZt(Integer zt) {
		this.zt = zt;
	}

	
}
